#include<iostream>
#include<math.h>
using namespace std;
int main() 
{
    int n = 0;
    cin >> n;
    int count = 0;
    for (int i = 2; i < n; ++i) 
    {
        int flag = 0;
        for (int j = 2; j <= sqrt(i); ++j) 
        {
            if (i % j == 0) 
            {
                flag = 1;
                break;
            }
        }
        if (flag == 0)
            count++;
    }
    cout << count << endl;
    return 0;
}